package a01;
/**
 * @author Sven Eric Panitz
 */
public class SimpleOval extends GeometricObject {

	private static final long serialVersionUID = 1L;

	public SimpleOval(double w, double h, Vertex pos) {
		super(w, h, pos);
	}

	public SimpleOval(double w, double h, double x, double y) {
		super(w, h, new Vertex(x, y));
	}

	@Override
	public double area() {
		return Math.PI * width * height / 4;
	}

	public @Override
	String toString() {
		return "SimpleOval(" + super.toString() + ")";
	}

	public @Override
	boolean equals(Object that) {
		return (that instanceof SimpleOval) && super.equals(that);
	}
}
